{% extends 'base.html' %}
{% block title %}
<title>Wow Dkp Engine</title>
<meta name="Keywords" content="wow,dkp"/>
<meta name="description" content="A wow dkp system" />
<style type="text/css" media="screen">
	b { width:120px; }
	input {
		border: 1px solid #666;
		background-color: #999;
	}
</style>
{% endblock %}
{% load filter %}
{% block contents %}
<div id="header">
	<div id="main-menu">
		<ul class=menu>
			<li class="normal-page" ><a href="/">{{ multi_language.ca_home }}</a></li>
			<li class="normal-page"><a href="/pub/events/">{{ multi_language.ca_event }}</a></li>
			<li class="normal-page"><a href="/pub/players/">{{ multi_language.ca_players }}</a></li>
			<li class="normal-page"><a href="/pub/overview/class/">{{ multi_language.ca_class }}</a></li>
			<li class="normal-page"><a href="/pub/overview/score/">{{ multi_language.ca_overview}}</a></li>
			<li class="current-page"><a href="/admin/site/">{{ multi_language.ca_admin}}</a></li>
		</ul>
	</div>
</div>
<div id="main">
	<div id="main-sider-bar">
		<div id="sider-body">
			<ul id="admin-menu">
					<li class="normal-page"><a href="/admin/site/">{{ multi_language.ca_site_config }}</a></li>
					<li class="normal-page"><a href="/admin/events/">{{ multi_language.ca_event_manage }}</a></li>
					<li class="current-page"><a href="/admin/players/">{{ multi_language.ca_player_manage }}</a></li>
					<li class="normal-page"><a href="/admin/events/create/">{{ multi_language.ca_create_event }}</a></li>
					<li class="normal-page"><a href="/admin/events/import/">{{ multi_language.ca_import_event }}</a></li>
					<li class="normal-page"><a href="/admin/import/adjust/">{{ multi_language.ca_import_dkp }}</a></li>
					<li class="normal-page"><a href="/admin/post/">Manage Post</a></li>
			</ul>
		</div>
	</div>
	<div id="main-bar">
	<form method="post" action=".">
		<b>Post Title</b><input type="text" name="title" value="{{ post.title }}" /><br /><br />
		<b>Post Content</b>
		<textarea name="content" rows="6" cols="5">{{ post.content }}</textarea><br /><br />
		<input type="submit" name="submit" value="{{ multi_language.ca_submit }}" id="submit"/>
	</form>
	<table id="data-list" cellspacing="0" style="border-collapse:collapse">
		<thead>
			<tr class="table-title">
				<th>Title</th>
				<th>Author</th>
				<th>Created</th>
				<th>Edit</th>
				<th>Content</th>
			</tr>
		</thead>
		<tbody>
			{% for posting in posts %}
			<tr>
				<td><a href="/admin/post/{{ posting.key.id }}">{{ posting.title }}</a></td>
				<td>{{ posting.author }}</td>
				<td>{{ posting.post_on|timezone:8|date:"Y-m-d H:i:s" }}</td>
				<td>{{ posting.edit_on|timezone:8|date:"Y-m-d H:i:s" }}</td>
				<td>{{ posting.content }}</td>
			</tr>
			{% endfor %}
		</tbody>
	</table>
	</div>
</div>
{% endblock %}
